Skip to content

docs: add missing FeatureHolder methods to FML spec#789

Open
jaredlockhart wants to merge 1 commit intomainfrom
2026-02-25-fml-spec-docs
Open

docs: add missing FeatureHolder methods to FML spec#789
jaredlockhart wants to merge 1 commit intomainfrom
2026-02-25-fml-spec-docs

Conversation

@jaredlockhart
Copy link
Contributor

Summary

Adds documentation for several FeatureHolder methods that exist in the source but were missing from the FML specification.

  • recordExperimentExposure(slug) — exposure recording for co-enrolling features (Swift + Kotlin examples)
  • recordMalformedConfiguration(partId) — report invalid experiment configs as Glean telemetry
  • toJSONObject() — get raw JSON representation of feature configuration
  • Testing helperswithCachedValue(), withInitializer(), withSdk(), isUnderTest() with usage examples and cross-link to Android integration guide

Fixes #788

🤖 Generated with Claude Code

Because

* Several FeatureHolder methods in the source are undocumented in
  the FML spec: recordExperimentExposure, recordMalformedConfiguration,
  toJSONObject, and the testing helpers
* Co-enrollment exposure recording pattern was only in the co-enrollment
  doc, not the main FML reference

This commit

* Adds recordExperimentExposure(slug) for co-enrolling features with
  Swift and Kotlin examples
* Adds recordMalformedConfiguration(partId) for reporting invalid
  experiment configurations as Glean telemetry
* Adds toJSONObject() for getting raw JSON representation
* Adds testing helpers section: withCachedValue, withInitializer,
  withSdk, isUnderTest with examples and cross-link to Android
  integration guide

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add missing FeatureHolder methods to FML spec

1 participant